<template>
  <view class="container">
    <!--头部导航栏 -->
    <view class="header">
      <uni-icons type="left" size="20"></uni-icons>
      <!-- 切换栏 -->
      <veiw class="tabnav">
        <view :class="{ navitem: true, navcommon: itemnavchecked == index }" v-for="(item, index) in navlist" :key="index" @click="itemnavchecked = index">{{ item }}</view>
      </veiw>
    </view>
    <!-- 分类 -->
    <scroll-view scroll-x class="scrool" scroll-with-animation="true">
      <view :class="{ item: true, common: checktype == index }" v-for="(item, index) in goodstype" :key="index" @click="checktype = index">{{ item }}</view>
    </scroll-view>
    <!-- 商品状态 -->
    <view class="goodsstatus" v-for="index in 6" :key="index">
      <veiw class="itemheader">
        <view class="itemheaderleft">
          <image src="/sub_my/static/myshop.png" mode="" class="shoplogo"></image>
          <view class="shopname">华为旗舰店</view>
          <uni-icons type="right" size="20"></uni-icons>
        </view>
        <view v-if="true" style="font-size: 26rpx; font-family: PingFang SC, PingFang SC; font-weight: 400; color: #61bdb2">待付款</view>
        <view v-if="false" style="font-size: 26rpx; font-family: PingFang SC, PingFang SC; font-weight: 400; color: #61bdb2">拼团中</view>
        <view v-if="false" style="font-size: 26rpx; font-family: PingFang SC, PingFang SC; font-weight: 400; color: #61bdb2">待收货</view>
        <view v-if="false" style="font-size: 26rpx; font-family: PingFang SC, PingFang SC; font-weight: 400; color: #61bdb2">交易完成</view>
        <view v-if="false" style="font-size: 26rpx; font-family: PingFang SC, PingFang SC; font-weight: 400; color: #61bdb2">订单关闭</view>
      </veiw>
      <view class="iteminfon">
        <image src="/static/image/default-avatar.png" mode="" class="goodsimage"></image>
        <view class="goodsinfo">
          <view class="goodstitle">华为 P50 直屏影像 华为 P50 直华为 P50 直屏影像 华为 P50</view>
          <view class="goodstypes">火山红；12+256</view>
        </view>
        <view class="goodsprice">
          <view class="price">￥39.00</view>
          <view class="goodscount">共2件</view>
        </view>
      </view>
    </view>
    <!-- 底部组件 -->
    <footerCom style="position: fixed; bottom: 0"></footerCom>
    <!-- 解决固定定位的覆盖问题 -->
    <view style="position: relative; bottom: 0; width: 750rpx; height: 98rpx"></view>
  </view>
</template>

<script>
import footerCom from '@/components/shopfooter/shopfooter.vue';
export default {
  components: {
    footerCom
  },
  data() {
    return {
      goodstype: ['全部', '待付款', '拼团中', '待发货', '待收货', '已完成'],
      navlist: ['充值', '提现', '兑换', '消息', '商城'],
      itemnavchecked: 0,
      checktype: 0
    };
  }
};
</script>

<style lang="less" scoped>
.container {
  box-sizing: border-box;
  .header {
    display: flex;
    align-items: center;
  }
  .scrool {
    width: 100%;
    white-space: nowrap;
    height: 60rpx;
    display: flex;
    padding-left: 30rpx;
    margin-top: 30rpx;
    .item {
      display: inline-block;
      font-size: 28rpx;
      padding-bottom: 10rpx;
      margin-right: 44rpx;
    }
    .common {
      font-size: 30rpx;
      color: #61bdb2;
      border-bottom: 4rpx solid #61bdb2;
    }
  }
  .tabnav {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    width: 650rpx;
    height: 72rpx;
    background: #ffffff;
    border-radius: 12rpx 12rpx 12rpx 12rpx;
    border: 1rpx solid #61bdb2;
    margin-left: 20rpx;
    .navitem {
      width: 20%;
      height: 70rpx;
      line-height: 70rpx;
      text-align: center;
      color: #61bdb2;
      border-right: 2rpx solid #61bdb2;
    }
    .navcommon {
      background-color: #61bdb2;
      color: #fff;
    }
  }
  .goodsstatus {
    box-sizing: border-box;
    padding: 24rpx;
    margin-top: 20rpx;
    width: 750rpx;
    height: 252rpx;
    background: #ffffff;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    .itemheader {
      display: flex;
      align-items: center;
      justify-content: space-between;
      .itemheaderleft {
        display: flex;
        align-items: center;
      }
      .shoplogo {
        width: 52rpx;
        height: 52rpx;
      }
      .shopname {
        margin-left: 10rpx;
        font-size: 28rpx;
      }
    }
    .iteminfon {
      display: flex;
      margin-top: 20rpx;
      .goodsimage {
        width: 128rpx;
        height: 128rpx;
        margin-right: 12rpx;
      }
      .goodsinfo {
        margin-right: 30rpx;
        .goodstitle {
          width: 412rpx;
          height: 40rpx;
          font-size: 28rpx;
          font-family: PingFang SC, PingFang SC;
          font-weight: bold;
          color: #222222;
          margin-top: 10rpx;
          overflow: hidden; //超出的文本隐藏
          text-overflow: ellipsis; //溢出用省略号显示
          white-space: nowrap; //溢出不换行
        }
        .goodstypes {
          font-size: 26rpx;
          font-family: PingFang SC, PingFang SC;
          font-weight: 400;
          color: #666666;
          margin-top: 20rpx;
        }
      }
      .goodsprice {
        margin-top: 10rpx;
        .price {
          font-size: 32rpx;
          font-family: PingFang SC, PingFang SC;
          font-weight: bold;
          color: #f10000;
          margin-bottom: 10rpx;
        }
        .goodscount {
          font-size: 26rpx;
          font-family: PingFang SC, PingFang SC;
          font-weight: 400;
          color: #666666;
          margin-left: 50rpx;
        }
      }
    }
  }
}
</style>
